package com.abe.quick.main.kotlin

import androidx.activity.viewModels
import com.abe.libquick.base.BaseActivity
import com.abe.quick.databinding.KotlinMainBinding
import com.abe.quick.vm.NormalKtxVM

class KotlinMainActivity : BaseActivity<KotlinMainBinding>() {

    val normalKtxVM: NormalKtxVM by viewModels()
    override fun getBinding(): KotlinMainBinding {
        return KotlinMainBinding.inflate(layoutInflater)
    }

    override fun initContent() {
        normalKtxVM.timeData().observe(this) {
            binding.itemName.text = it
        }
        binding.itemButton.setOnClickListener {
            normalKtxVM.timeAction();
        }
    }
}